import type { Router } from "vue-router";
import config from "@/config";

export default function (router: Router) {
  router.beforeEach((to, from, next) => {
    document.title = (to.meta?.title as string) || config.title;
    next();
  });
}
